/**
 * @desc 组件Props参数类型定义
 * @author MiyueFE <https://github.com/miyuesc>
 * @since 2024/7/12 上午10:06
 */

import type { CSSProperties, Component } from 'vue'
import type { BaseNode, BaseNodeBO, BaseNodeType } from '@/types/node-models'

// 排版方向
export type FlowDirection = 'horizontal' | 'vertical'

// append 弹出菜单
export interface AppendMenuItem<T extends BaseNodeType> {
  type: T
  name: string
  businessData: Partial<BaseNodeBO>
  icon?: Component
  iconStyle?: CSSProperties
}
export type AppendMenuProvider<T extends BaseNodeType> = (node?: BaseNode) => Array<AppendMenuItem<T>>
